/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-12 07:22:24
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-12 21:22:47
 */

import 'package:flutter/material.dart';
import 'package:flutter_data_center/controller/home_controller.dart';
import 'package:get/get.dart';
import 'item_card.dart';

class AttendanceAndTask extends StatelessWidget {
  const AttendanceAndTask({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) => GetBuilder<HomeController>(
        builder: (_controller) => Row(
          children: [
            ItemCard(
              title: "考勤",
              upContent: "学生应到",
              upCount: _controller.attendanceStatistics.student,
              downContent: "教师应道",
              downCount: _controller.attendanceStatistics.teacher,
              color: Color(0xffFFFAD0),
            ),
            SizedBox(width: 20),
            ItemCard(
              title: "任务",
              upContent: "总数",
              upCount: _controller.taskStatistics.total,
              downContent: "已完成",
              downCount: _controller.taskStatistics.deal,
              color: Color(0xffF2EAFF),
            ),
          ],
        ),
      );
}
